
import React from 'react';
import ReactMarkdown from 'react-markdown';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
import { materialLight } from 'react-syntax-highlighter/dist/esm/styles/prism'
const QianMarkDown = ({children}: {children: any}) => {
  const renderers: any = {
    code: ({ language, value }: { language: any, value: any }) => {
      return <SyntaxHighlighter style={materialLight} language={language} children={value} />
    }
  }
  return (
    <ReactMarkdown
      children={children}
      renderers={renderers}
    />
  )
}

export default QianMarkDown